package com.app.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.app.entity.AppInfo;

public interface AppInfoDao {
	List<AppInfo> getAppInfoPage(@Param("id") int id,
			@Param("categoryLevel1") int categoryLevel1,
			@Param("categoryLevel2") int categoryLevel2,
			@Param("categoryLevel3") int categoryLevel3,
			@Param("softwareName") String softwareName,
			@Param("status") int status, @Param("flatformId") int flatformId,
			@Param("startIndex") int startIndex, @Param("pageSize") int pageSize);

	List<AppInfo> getAll();

    int addInfo(AppInfo appInfo);//添加appInfo信息

	AppInfo getById(@Param("id") int id);
	int getRowsCount(@Param("cid") int cid,	@Param("categoryLevel1") int categoryLevel1,
			@Param("categoryLevel2") int categoryLevel2,
			@Param("categoryLevel3") int categoryLevel3,
			@Param("softwareName") String softwareName,
			@Param("status") int status, @Param("flatformId") int flatformId);
	int getRowsCount1(@Param("cid") int cid,	@Param("categoryLevel1") int categoryLevel1,
			@Param("categoryLevel2") int categoryLevel2,
			@Param("categoryLevel3") int categoryLevel3,
			@Param("softwareName") String softwareName,
			@Param("status") int status, @Param("flatformId") int flatformId);

	void update(AppInfo appInfo);

	
	AppInfo getVersion(@Param("id")int id);
	

	List<AppInfo> getAppInfo(@Param("id") int id);//根据id查询App信息
	int deleteAppInfo(@Param("id") int id);//根据id删除APp信息


	int updateflatform(@Param("status") int status,@Param("id")int id);
	

	//审核
	List<AppInfo> getAppInfoPageByStatus(@Param("id") int id,
			@Param("categoryLevel1") int categoryLevel1,
			@Param("categoryLevel2") int categoryLevel2,
			@Param("categoryLevel3") int categoryLevel3,
			@Param("softwareName") String softwareName,
			@Param("status") int status, @Param("flatformId") int flatformId,
			@Param("startIndex") int startIndex, @Param("pageSize") int pageSize
     );
	//根据id审核
	int updateInfoByStatus(@Param("id") int id);

}
